package com.lishui.waterojbackendserviceclient.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lishui.waterojbackendcommon.result.PageResult;
import com.lishui.waterojbackendmodel.model.pojo.dto.QuestionAddDTO;
import com.lishui.waterojbackendmodel.model.pojo.dto.QuestionQueryDTO;
import com.lishui.waterojbackendmodel.model.pojo.dto.QuestionUpdateDTO;
import com.lishui.waterojbackendmodel.model.pojo.entity.Question;
import com.lishui.waterojbackendmodel.model.pojo.entity.QuestionSubmit;
import com.lishui.waterojbackendmodel.model.pojo.vo.QuestionVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
* @author 24197
* @description 针对表【question(题目)】的数据库操作Service
* @createDate 2024-04-13 21:17:35
*/
@FeignClient(name = "wateroj-backend-question-service", path = "/api/question/inner")
public interface QuestionFeignClient {

//questionService.getById(questionId);
//questionService.updateById(questionUpdateNum);
//questionSubmitService.getById(questionSubmitId);
//questionSubmitService.updateById(questionSubmitUpdate);
//questionSubmitService.count(submitNumQueryWrapper);
    @GetMapping("/get/id")
    Question getQuestionById(@RequestParam("questionId") long questionId);

    @GetMapping("/question_submit/get/id")
    QuestionSubmit getQuestionSubmitById(@RequestParam("questionId") long questionSubmitId);

    @PostMapping("/question_submit/update")
    boolean updateQuestionSubmitById(@RequestBody QuestionSubmit questionSubmit);

    @PostMapping("/update")
    boolean updateQuestionById(@RequestBody Question question);

    @PostMapping("/count")
    Long count(@RequestBody QuestionSubmit questionSubmit);

}
